
{% extends 'TopxiaAdminBundle::layout.html.twig' %} 

{% set menu = 'admin_course_tixing'  %}

{% block main %}
{{ web_macro.flash_messages() }}

<div class="pull-right" >
<a style="font-size:18px" class="btn btn-success btn-sm" href="{{path('admin_tixing_add')}}">创建题型</a>
</div>
<table class="table table-hover" id="category-table">
  <thead>
    <tr>
      <th width="35%">题型名称</th>
      <th width="25%">题型标题</th>
      <th width="20%">题型类别</th>
      <th width="20%">操作</th>
    </tr>
  </thead>


  {% for type in type%}
  	<tr>

  		<td>{{ type.name }}</td>
  		<td>{{ type.title }}</td>
  		<td>
  			{% if type.ptype == 'single_choice' %}单选{% endif %}
  			{% if type.ptype == 'choice' %}多选{% endif %}
  			{% if type.ptype == 'uncertain_choice' %}不定向选择题{% endif %}
  			{% if type.ptype == 'fill' %}填空题{% endif %}
  			{% if type.ptype == 'determine' %}判断题{% endif %}
  			{% if type.ptype == 'essay' %}问答题{% endif %}
  			{% if type.ptype == 'material' %}材料题{% endif %}
  			{% if type.ptype == 'shiwu' %}实务题{% endif %}
  		</td>


  		<td><a class="btn btn-default btn-sm "  href="{{ path('admin_tixing_delete', {id:type.pid}) }}"><i class="glyphicon glyphicon-trash"></i >&nbsp;&nbsp;删除</a></td>

  	
  	</tr>

  {% endfor %}

</table> 

{{ web_macro.paginator(paginator) }}
{% endblock %}